<template>
  <div class="map-content" id="map"></div>
</template>

<script>
import xMaps from "x-maps";
import "x-maps/xMaps.css";

window.xMaps = xMaps;
export default {
  data() {
    return {
      code: "",
    };
  },
  methods: {
    codeRun(code) {
      this.code = code;
      try {
        eval(code);
      } catch {
        this.$message.error("语法存在错误，请检查你的代码");
      }
    },
  },
};
</script>

<style scoped lang="scss">
.map-content {
  width: 100%;
  height: 100%;
  background-color: #a3ccff;
}
</style>
